﻿@model SysClientWorking
@{
	var years = new List<SelectListItem>(Common.UnSelect);
	var months = new List<SelectListItem>(Common.UnSelect);
	years[0].Text = "请选择";
	months[0].Text = "请选择";
	var curyear = DateTime.Now.Year;
	for (var i = 50; i > 0; i--)
	{
		years.Add(new SelectListItem { Text = (curyear - i) + "年", Value = (curyear - i) + "" });
	}
	for (var m = 1; m <= 12; m++)
	{
		months.Add(new SelectListItem { Text = m + "月", Value = m + "" });
	}
}
@using (Ajax.BeginForm(null, null, new AjaxOptions { UpdateTargetId= "subMain" }, new { @class = "form-edit" }))
{
	<div class="ui-content">
		<div class="ui-cell ui-cell-full">
			<label>时间从</label>
			@Html.DropDownListFor(p => p.YearFrom, years, new { @class = "s" })
			@Html.DropDownListFor(p => p.MonthFrom, months, new { @class = "s" })
			<span>到</span>
			@Html.DropDownListFor(p => p.YearTo, years, new { @class = "s" })
			@Html.DropDownListFor(p => p.MonthTo, months, new { @class = "s" })
			@Html.HiddenFor(p => p.ID)
			@Html.HiddenFor(p => p.CID)
		</div>
		<div class="ui-cell ui-cell-full">
			<label>公司名称</label>
			@Html.EditorFor(p => p.Caption)
		</div>
		<div class="ui-cell ui-cell-full">
			<label>公司职务</label>
			@Html.TextBoxFor(p => p.Title, new { @class = "m" })
		</div>
		<div class="ui-cell ui-cell-full">
			<label>工作描述</label>
			@Html.TextAreaFor(p => p.Description)
		</div>
		<div class="ui-cell ui-cell-full">
			<label></label>
			<input type="submit" value="保存" class="btn"/>
			@Html.ValidationSummary()
		</div>
	</div>
}
<script type="text/javascript">
	if ("@ViewBag.Saved" == 1) window.datachanged = true;
</script>
